
<template tag="以下文档内容为hycli自动生成">
  <div>
   
    <!-- 已解决 -->
    <el-dialog v-model="conf.aaaoi_visible" 
        draggable
      title="已解决" :close-on-click-modal="false"  width="68%"
      top="10vh" 
      :before-close="hide_aaaoi">
    <el-form  ref="fm_aaaoi" :model="form_aaaoi" :rules="rules_aaaoi">
    <el-row>
    <el-col :span="24">
    <!-- {"index":90,"raw":"solution","name":"solution","cname":"Solution","type":{"raw":"text","name":"text","len":0,"dlen":0},"defValue":"","allowNull":true,"constraints":["le","v","rows(8)","sr"],"desc":{"raw":"解决方案","name":"解决方案"}} -->
    <!--解决方案 输入控件 -->
    <el-form-item prop="solution" label="解决方案" label-width="100px" label-position="right">
      <el-input clearable style="width: 100%" v-model="form_aaaoi.solution" 
      :rows="8"  type="textarea" show-word-limit  placeholder="请输入解决方案"  />
      </el-form-item>
    </el-col>
    </el-row>
    </el-form>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="hide_aaaoi" icon="close">取消</el-button>
        <el-button type="primary" @click="save_aaaoi" icon="select">提交</el-button>
      </span>
    </template>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data(){
    return{
      conf:{
        aaaoi_visible:false,//已解决
      },
      form_aaaoi:{},//已解决
      //已解决
      rules_aaaoi:{ 
        solution:[{required:false, message:"请输入解决方案", trigger: 'blur'}],
      },
    }
  },
  methods:{
     //--------------------已解决---------------------------------
      //显示 已解决 弹出框
      show_aaaoi(fm){
        //处理输入参数
        let currentForm = {}
        Object.assign(this.form_aaaoi,currentForm)
        this.form_aaaoi.solution = fm.solution
        this.form_aaaoi.id = fm.id
        //特殊参数处理
        // this.form_aaaoi.id = (this.bcheck||[]).join(",")
        this.form_aaaoi.status = "20"
        this.loadEnums_aaaoi()
        this.conf.aaaoi_visible = true;
      },

      //隐藏 已解决 弹出框
      hide_aaaoi(){
        this.conf.aaaoi_visible = false;
        this.$refs.fm_aaaoi.resetFields();
      },

      //保存 已解决 弹出框数据
      save_aaaoi(){
        let that = this
        this.$refs.fm_aaaoi.validate((v=>{
          if(!v) return
          let post_form_aaaoi = this.form_aaaoi
          this.$theia.http.post("/ws/prod/problem/resv",post_form_aaaoi).then(res=>{
            that.$notify.success({title: '成功',message: '提交成功',duration:5000})
            that.$emit("onsaved")
            that.hide_aaaoi()
          }).catch(res=>{
            let code = ((res||{}).response||{}).status||0
            let msg= `提交失败(${code})`
            that.$notify.error({title: '失败',message:msg,duration:5000})
          })
      }))
    },
    //已解决
    loadEnums_aaaoi(){
    },

  },
}
</script>
<style scoped>
.form_item_info{
  margin-left: 4px;
  color:#999;
}
.form_item_info:hover{
  cursor: pointer;
  font-weight: 500;
  color:#333;
}
</style>